
import {
    DIC
} from '@/const/dic';
import Store from '../../store/';
const allPermission = Store.state.user.permission;
const isAdmin = Store.state.user.userInfo.superAdmin;
export const videoTopicTableOption = {
    border: false,
    index: false,
    selection: true,
    calcHeight: 350,
    columnBtn: false,
    searchClearable: false,
    selectClearBtn: false,
    searchResetBtn: false,
    height: "auto",
    menu: true,
    menuAlign: "center",
    searchBtn: true,
    labelWidth: 140,
    refreshBtn: true,
    tip: false,
    addBtn: true,
    dialogWidth: '1100px',
    dialogHeight: 'auto',
    menuWidth: 180,
    editBtn: isAdmin || !!allPermission['/admin/video-topic/modify'],
    viewBtn: false,
    delBtn: isAdmin || !!allPermission['/admin/video-topic/delete'],
    column: [
        
        {
            "label": "话题编号",
            "prop": "topicNo",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": true,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false
        },
        {
            "label": "话题封面",
            "prop": "coverImg",
            "search": false,
            "type": "upload",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "listType": "picture-img",
            "showFileList": false,
            "imgHeight": 60,
            "imgWidth": "auto",
            "action": "_/admin/upload/image",
            "tip": "只能上传jpg/png文件，且不超过500kb",
            "rules": [
                {
                    "required": true,
                    "message": "请上传话题封面",
                    "trigger": "blur"
                }
            ]
        },
        {
            "label": "话题二维码",
            "prop": "barCodeImg",
            "search": false,
            "type": "upload",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "listType": "picture-img",
            "showFileList": false,
            "imgHeight": 60,
            "imgWidth": "auto",
            "action": "_/admin/upload/image",
            "tip": "只能上传jpg/png文件，且不超过500kb",
            "rules": [
                {
                    "required": false,
                    "message": "请上传话题二维码",
                    "trigger": "blur"
                }
            ]
        },
        {
            "label": "话题状态",
            "prop": "status",
            "search": true,
            "type": "tag",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false,
            "placeholder": "请选择话题状态",
            "dicData": DIC["videoTopicstatusDic"]
        },
        {
            "label": "话题标题",
            "prop": "title",
            "search": true,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 24,
            "display": true,
            "hide": false,
            "rules": [
                {
                    "required": true,
                    "message": "话题标题不能为空",
                    "trigger": "blur"
                }
            ]
        },
        {
            "label": "开始时间",
            "prop": "startTime",
            "search": false,
            "type": "datetime",
            "fixed": false,
            "width": "170",
            format: "yyyy-MM-dd HH:mm:ss",
            valueFormat: "yyyy-MM-dd HH:mm:ss",
            "row": false,
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [
                {
                    "required": true,
                    "message": "请选开始时间",
                    "trigger": "blur"
                }
            ]
        },
        {
            "label": "直播间",
            "prop": "videoChannelId",
            "search": false,
            formslot: true,
            "type": "select",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": true,
            "rules": [
                {
                    "required": true,
                    "message": "请选择直播间",
                    "trigger": "blur"
                }
            ]
        },
        {
            "label": "直播间名称",
            "prop": "videoChannelName",
            "search": false,
            formslot: true,
            "type": "select",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false,
            "rules": [
                {
                    "required": true,
                    "message": "请选择直播间",
                    "trigger": "blur"
                }
            ]
        },
        {
            "label": "直播间编号",
            "prop": "videoChannelNo",
            "search": false,
            formslot: true,
            "type": "select",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false,
            "rules": [
                {
                    "required": true,
                    "message": "请选择直播间",
                    "trigger": "blur"
                }
            ]
        },
        {
            "label": "主播名称",
            "prop": "anchor",
            "search": false,
            formslot: true,
            "type": "select",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false,
            "rules": [
                {
                    "required": true,
                    "message": "请选择直播间",
                    "trigger": "blur"
                }
            ]
        },
        {
            "label": "话题分类",
            "prop": "categoryId",
            "search": false,
            "type": "select",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            props: {
                label: 'label',
                value: 'value'
            },
            dicUrl: '/admin/video-topic/category/list-all',
            dicMethod: 'post',
            "rules": [
                {
                    "required": true,
                    "message": "请选择分类",
                    "trigger": "blur"
                }
            ]
        },
        {
            "label": "直播横竖屏类型",
            "prop": "screenType",
            "search": false,
            "type": "tag",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "placeholder": "请选择直播横竖屏类型",
            "dicData": DIC["videoTopicscreenTypeDic"],
            "rules": [
                {
                    "required": true,
                    "message": "请选择直播横竖屏类型",
                    "trigger": "blur"
                }
            ]

        },
        {
            "label": "直播类型",
            "prop": "videoType",
            "search": false,
            "type": "tag",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "placeholder": "请选择直播类型",
            "dicData": DIC["videoTopicvideoTypeDic"],
            "rules": [
                {
                    "required": true,
                    "message": "请选择直播类型",
                    "trigger": "blur"
                }
            ]
        },

        {
            "label": "是否推荐话题",
            "prop": "recommendFlag",
            "search": true,
            "type": "tag",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "placeholder": "请选择是否推荐话题",
            "dicData": DIC["YesNo"],
            "rules": [
                {
                    "required": true,
                    "message": "请选择是否推荐话题",
                    "trigger": "blur"
                }
            ]
        },
        {
            "label": "排序值",
            "prop": "sort",
            "search": false,
            "type": "number",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": true,
            "hide": false,
            "rules": [
                {
                    "required": true,
                    "message": "请输入排序值",
                    "trigger": "blur"
                }
            ]
        },

        {
            "label": "审核备注",
            "prop": "checkRemark",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false
        },
        {
            "label": "活动介绍",
            "prop": "topicDesc",
            "search": false,
            "type": "editor",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 24,
            // "display": true,
            "hide": true
        },
        {
            "label": "创建时间",
            "prop": "createTime",
            "search": false,
            "type": "datetime",
            "fixed": false,
            "width": "170",
            "row": false,
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false
        },
        {
            "label": "创建人",
            "prop": "creator",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false
        },
        {
            "label": "修改时间",
            "prop": "modifyTime",
            "search": false,
            "type": "datetime",
            "fixed": false,
            "width": "170",
            "row": false,
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false
        },
        {
            "label": "修改人",
            "prop": "modifier",
            "search": false,
            "type": "text",
            "fixed": false,
            "width": "auto",
            "row": false,
            "minWidth": "120",
            "readonly": false,
            "span": 12,
            "display": false,
            "hide": false
        }
    ]
};
